🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / database / src / commonMain / kotlin / org / meshtastic / core / database / entity / ChannelSetEntity.kt
Displaying Raw • Download
core/database/src/commonMain/kotlin/org/meshtastic/core/database/entity/ChannelSetEntity.kt 41414f832f938b655c97bc07509bc140ea16e2a3 (41414f83) Text, 1.88 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.database.entity
Tff7b72import T7ee787androidx.room3.ColumnInfo
Tff7b72import T7ee787androidx.room3.Entity
Tff7b72import T7ee787androidx.room3.PrimaryKey
Tff7b72import T7ee787org.meshtastic.proto.ChannelSet
T8b949e/**
* The connected device's channel set, stored per-device (one row per Room database).
*
* The channel set was historically a single **global** DataStore (`channel_set.pb`) while messages are per-device, so
* switching between devices rendered one device's messages against another device's channels — the same channel then
* appeared multiple times in the conversation list (#4623). Storing it here, in the per-device database, keeps it in
* lockstep with the messages it labels. The whole [ChannelSet] proto (settings + lora_config) is persisted as one row
* so semantics match the old whole-proto DataStore exactly.
*/
Tf0883e@EntityTb4b4b4(Te6edf3tableName Tff7b72= Ta5d6ff"Ta5d6ffchannel_setTa5d6ff"Tb4b4b4)
Tff7b72data Tff7b72class T56d364ChannelSetEntityTb4b4b4(
Tf0883e@PrimaryKey Tf0883e@ColumnInfoTb4b4b4(Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffidTa5d6ff"Tb4b4b4) Tff7b72val Te6edf3idTb4b4b4: Tffa657Int Tff7b72= Te6edf3SINGLETON_IDTb4b4b4,
Tf0883e@ColumnInfoTb4b4b4(Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffchannel_setTa5d6ff"Tb4b4b4) Tff7b72val Te6edf3channelSetTb4b4b4: Te6edf3ChannelSetTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72companion Tff7b72object Tb4b4b4{
T8b949e/** There is only ever one channel set per device, so every row uses this fixed primary key. */
Tff7b72const Tff7b72val Te6edf3SINGLETON_ID Tff7b72= T79c0ff0
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s